package com.jh.user.business.impl;

import com.jh.user.business.DataBusiness;
import com.jh.user.pojo.Data;
import com.jh.user.repository.DataRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DataBusinessImpl implements DataBusiness {

    @Autowired
    private DataRepository dataRepository;

    @Override
    public List<Data> findByParentIdAndDataType(Long parentId, Integer dataType) {
        return dataRepository.findByParentIdAndDataType(parentId,dataType);
    }

    @Override
    public List<Data> findByDataType(String DataType) {
        return dataRepository.findByDataType(DataType);
    }
}
